<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="/auth/login" method="post">
    <span style="background: red" id="msg"></span>
    <input type="text" name="username" id="username"/>
    <input type="password" name="password" id="password"/>
    <button class="login" type="submit" value="submit">登录</button>
</form>
<script type="text/javascript" src="../../js/jquery-1.11.0.js"></script>
<script type="text/javascript">
    $(".login").click(function () {
        var userName = $("#username").val();
        if (userName == '' || userName == null) {
            alert("用户名输入不能为空");
            return;
        }

        var password = $("#password").val();
        if (password == '' || password == null) {
            alert("密码输入不能为空");
            return;
        }
    });
</script>
</body>
</html>